$(function(){
	//检验用户名是否存在，jquery的ajax异步加载
	$('#username').change(function(){
		var username = $(this).val();
		var span = $('#usernames');
		$.get(path+'/user?method=check_user&username='+username,function(data){
			if(data.code==1)
				span.css("color","red");
			span.text(data.Message);
		},'json');
	});
})